<!-- 题库管理-分类管理 -->
<div class="manageTitle">
	题库管理-分类管理
</div>

<div class="content" ng-controller="sortManage">
	<div class="addBtn">
		<a href="javascript:;" class="btnForClass" ng-click="addSort();">新建分类</a>

		<div class="table">
			<table>
				<thead>
					<tr>
						<th>分类名称</th>
						<th>分类图标</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in exercisesThemeList">
						<td>{{item.name}}</td>
						<td><img ng-src="../img/{{item.img_num}}.png" class="coverImg"></td>
						<td class="topicHasWidth">
							<a href="javascript:;"><img src="../img/edit.png" class="edit" ng-click="editSort(item);"></a>
							<a href="javascript:;"><img src="../img/delete.png" ng-click="deleteSort(item);"></a>
						</td>
					</tr>
					<tr ng-if="noData">
						<td colspan="6"><img src="../img/noData.png" class="height"></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>

<!-- 添加分类页面 -->
<script type="text/ng-template" id="addSort.html">
	<div class="sortAdd">
		<p class="clearfix infoCourse">
			<label>分类名称</label>
			<input type="text" ng-model="name">
		</p>
		<p class="clearfix infoCourse">
			<label>图标编号</label>
			<input type="text" ng-model="imgNum">
		</p>

		<a href="javascript:;" class="sure" ng-click="sureAdd();">确定</a>
		<a href="javascript:;" class="cancel" ng-click="cancelAdd();">取消</a>
		
		<div class="allIcon">
			<div class="clearfix">
				<dl ng-repeat="item in imgList track by $index" ng-click="selectIcon($index);">
					<dt><img ng-src="img/{{$index+1}}.png"></dt>
					<dd>{{$index+1}} {{item.name}}</dd>
				</dl>
			</div>
			
			<p>图标编号</p>
		</div>
	</div>
</script>

<!-- 编辑分类页面 -->
<script type="text/ng-template" id="editSort.html">
	<div class="sortAdd">
		<p class="clearfix infoCourse">
			<label>分类名称</label>
			<input type="text" ng-model="sort.name">
		</p>
		<p class="clearfix infoCourse">
			<label>图标编号</label>
			<input type="text" ng-model="sort.img_num">
		</p>

		<a href="javascript:;" class="sure" ng-click="sureAdd();">确定</a>
		<a href="javascript:;" class="cancel" ng-click="cancelAdd();">取消</a>
		
		<div class="allIcon">
			<div class="clearfix">
				<dl ng-repeat="item in imgList track by $index" ng-click="selectIcon($index);">
					<dt><img ng-src="img/{{$index+1}}.png"></dt>
					<dd>{{$index+1}} {{item.name}}</dd>
				</dl>
			</div>
			
			<p>图标编号</p>
		</div>
	</div>
</script>